package com.example.client;

import com.example.common.Result;
import com.example.entity.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "cloud-order-service")
public interface OrderClient {
    @PostMapping("/order/create")
    Result<Order> create(@RequestBody Order order);

    @GetMapping("/order/get/{id}")
    Result<Order> getOrderById(@PathVariable("id") Long id);

    @PostMapping("/order/pay/{id}")
    Result<Order> pay(@PathVariable("id") Long id);

    @GetMapping("/order/port")
    String getPort();
} 